<?php

namespace app\api\model;

use app\admin\model\StoreSub;
use think\Model;

class ShareOrder extends Model
{
    protected $name = 'share_order';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';
    public function storesub(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo("app\admin\model\StoreSub", 'account', 'account', [], 'LEFT')->setEagerlyType(0);
    }
    public function store(){
        return $this->belongsTo("app\admin\model\Store", 'sub_mch_id', 'sub_mch_id', [], 'LEFT')->setEagerlyType(0);
    }
}